3.8 \(\int x^3 \cos ^2(a+b x^2) \, dx\)

Optimal. Leaf size=51 \[ \frac{\cos ^2\left (a+b x^2\right )}{8 b^2}+\frac{x^2 \sin \left (a+b x^2\right ) \cos \left (a+b x^2\right )}{4 b}+\frac{x^4}{8} \]

[Out]

x^4/8 + Cos[a + b*x^2]^2/(8*b^2) + (x^2*Cos[a + b*x^2]*Sin[a + b*x^2])/(4*b)

________________________________________________________________________________________

Rubi [A]  time = 0.0519296, antiderivative size = 51, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {3380, 3310, 30} \[ \frac{\cos ^2\left (a+b x^2\right )}{8 b^2}+\frac{x^2 \sin \left (a+b x^2\right ) \cos \left (a+b x^2\right )}{4 b}+\frac{x^4}{8} \]

Antiderivative was successfully verified.

[In]

Int[x^3*Cos[a + b*x^2]^2,x]

[Out]

x^4/8 + Cos[a + b*x^2]^2/(8*b^2) + (x^2*Cos[a + b*x^2]*Sin[a + b*x^2])/(4*b)

Rule 3380

Int[((a_.) + Cos[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Cos[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IntegerQ[Simpl
ify[(m + 1)/n]] && (EqQ[p, 1] || EqQ[m, n - 1] || (IntegerQ[p] && GtQ[Simplify[(m + 1)/n], 0]))

Rule 3310

Int[((c_.) + (d_.)*(x_))*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(d*(b*Sin[e + f*x])^n)/(f^2*n
^2), x] + (Dist[(b^2*(n - 1))/n, Int[(c + d*x)*(b*Sin[e + f*x])^(n - 2), x], x] - Simp[(b*(c + d*x)*Cos[e + f*
x]*(b*Sin[e + f*x])^(n - 1))/(f*n), x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n, 1]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps

\begin{align*} \int x^3 \cos ^2\left (a+b x^2\right ) \, dx &=\frac{1}{2} \operatorname{Subst}\left (\int x \cos ^2(a+b x) \, dx,x,x^2\right )\\ &=\frac{\cos ^2\left (a+b x^2\right )}{8 b^2}+\frac{x^2 \cos \left (a+b x^2\right ) \sin \left (a+b x^2\right )}{4 b}+\frac{1}{4} \operatorname{Subst}\left (\int x \, dx,x,x^2\right )\\ &=\frac{x^4}{8}+\frac{\cos ^2\left (a+b x^2\right )}{8 b^2}+\frac{x^2 \cos \left (a+b x^2\right ) \sin \left (a+b x^2\right )}{4 b}\\ \end{align*}

Mathematica [A]  time = 0.129541, size = 40, normalized size = 0.78 \[ \frac{2 b x^2 \left (\sin \left (2 \left (a+b x^2\right )\right )+b x^2\right )+\cos \left (2 \left (a+b x^2\right )\right )}{16 b^2} \]

Antiderivative was successfully verified.

[In]

Integrate[x^3*Cos[a + b*x^2]^2,x]

[Out]

(Cos[2*(a + b*x^2)] + 2*b*x^2*(b*x^2 + Sin[2*(a + b*x^2)]))/(16*b^2)

________________________________________________________________________________________

Maple [A]  time = 0.03, size = 42, normalized size = 0.8 \begin{align*}{\frac{{x}^{4}}{8}}+{\frac{{x}^{2}\sin \left ( 2\,b{x}^{2}+2\,a \right ) }{8\,b}}+{\frac{\cos \left ( 2\,b{x}^{2}+2\,a \right ) }{16\,{b}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^3*cos(b*x^2+a)^2,x)

[Out]

1/8*x^4+1/8/b*x^2*sin(2*b*x^2+2*a)+1/16/b^2*cos(2*b*x^2+2*a)

________________________________________________________________________________________

Maxima [A]  time = 1.1601, size = 57, normalized size = 1.12 \begin{align*} \frac{2 \, b^{2} x^{4} + 2 \, b x^{2} \sin \left (2 \, b x^{2} + 2 \, a\right ) + \cos \left (2 \, b x^{2} + 2 \, a\right )}{16 \, b^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*cos(b*x^2+a)^2,x, algorithm="maxima")

[Out]

1/16*(2*b^2*x^4 + 2*b*x^2*sin(2*b*x^2 + 2*a) + cos(2*b*x^2 + 2*a))/b^2

________________________________________________________________________________________

Fricas [A]  time = 1.64402, size = 105, normalized size = 2.06 \begin{align*} \frac{b^{2} x^{4} + 2 \, b x^{2} \cos \left (b x^{2} + a\right ) \sin \left (b x^{2} + a\right ) + \cos \left (b x^{2} + a\right )^{2}}{8 \, b^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*cos(b*x^2+a)^2,x, algorithm="fricas")

[Out]

1/8*(b^2*x^4 + 2*b*x^2*cos(b*x^2 + a)*sin(b*x^2 + a) + cos(b*x^2 + a)^2)/b^2

________________________________________________________________________________________

Sympy [A]  time = 2.18639, size = 78, normalized size = 1.53 \begin{align*} \begin{cases} \frac{x^{4} \sin ^{2}{\left (a + b x^{2} \right )}}{8} + \frac{x^{4} \cos ^{2}{\left (a + b x^{2} \right )}}{8} + \frac{x^{2} \sin{\left (a + b x^{2} \right )} \cos{\left (a + b x^{2} \right )}}{4 b} - \frac{\sin ^{2}{\left (a + b x^{2} \right )}}{8 b^{2}} & \text{for}\: b \neq 0 \\\frac{x^{4} \cos ^{2}{\left (a \right )}}{4} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**3*cos(b*x**2+a)**2,x)

[Out]

Piecewise((x**4*sin(a + b*x**2)**2/8 + x**4*cos(a + b*x**2)**2/8 + x**2*sin(a + b*x**2)*cos(a + b*x**2)/(4*b)
- sin(a + b*x**2)**2/(8*b**2), Ne(b, 0)), (x**4*cos(a)**2/4, True))

________________________________________________________________________________________

Giac [A]  time = 1.14041, size = 74, normalized size = 1.45 \begin{align*} \frac{2 \, b x^{2} \sin \left (2 \, b x^{2} + 2 \, a\right ) + 2 \,{\left (b x^{2} + a\right )}^{2} - 4 \,{\left (b x^{2} + a\right )} a + \cos \left (2 \, b x^{2} + 2 \, a\right )}{16 \, b^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*cos(b*x^2+a)^2,x, algorithm="giac")

[Out]

1/16*(2*b*x^2*sin(2*b*x^2 + 2*a) + 2*(b*x^2 + a)^2 - 4*(b*x^2 + a)*a + cos(2*b*x^2 + 2*a))/b^2